package com.dpf.hou.util;

import org.springframework.util.Base64Utils;

public class Base64Util {
    //加密
    public static String base64Encode(String text) {
        byte[] res = Base64Utils.encode(text.getBytes());
        return new String(res);
    }
    //解密
    public static String base64Decode(String text) {
        byte[] res = Base64Utils.decodeFromString(text);
        return new String(res);
    }
}

